//
//  CommunityCell.m
//  Four_Fit
//
//  Created by lanou on 16/7/13.
//  Copyright © 2016年 xmaz. All rights reserved.
//

#import "CommunityCell.h"

@interface CommunityCell ()
@property (weak, nonatomic) IBOutlet UIImageView *userpic;
@property (weak, nonatomic) IBOutlet UILabel *username;
@property (weak, nonatomic) IBOutlet UILabel *title;

@property (weak, nonatomic) IBOutlet UILabel *content;


@end

@implementation CommunityCell

- (void)awakeFromNib {
    self.userpic.layer.cornerRadius = self.userpic.frame.size.width * 0.5;
    self.userpic.layer.masksToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setCommunity:(Community *)community {
    
    _community = community;
    
    [self.userpic sd_setImageWithURL:[NSURL URLWithString:community.userpic]];
    self.username.text = community.username;
    self.title.text = community.title;
    self.content.text = community.content;
}

@end
